import request from '@/utils/request.js'

// 文章列表
export const cateListApi = () => {
    return request({
        url: '/my/cate/list',
    })
}
// 新增文章
export const addCateApi = (data) => {
    return request({
        url: '/my/cate/add',
        method: 'post',
        data
    })
}
// 编辑文章
export const editCateApi = (data) => {
    return request({
        url: '/my/cate/info',
        method: 'put',
        data
    })
}
// 删除文章
export const delCateApi = (data) => {
    return request({
        url: `/my/cate/del`,
        method: 'delete',
        params: {
            id: data
        }
    })
}


// 文章管理
// 文章列表  query传参
export const articleListApi = (data) => {
    return request({
        url: '/my/article/list',
        method: 'get',
        params: data
    })
}
// 新增文章
export const articlePublishApi = (data) => {
    return request({
        url: '/my/article/add',
        method: 'post',
        data
    })
}